package com.SouthernWall_404.AgeSuitcase.Common.event;

import com.SouthernWall_404.AgeSuitcase.Common.API.Info.AbstractContent;
import com.SouthernWall_404.AgeSuitcase.Common.API.Info.ConstractInfo;
import com.SouthernWall_404.AgeSuitcase.Common.world.item.ConstractItem;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;

import java.util.List;

public class test {

    @SubscribeEvent
    public static void onClientSetup(PlayerInteractEvent.RightClickItem event) {

        Player player=event.getEntity();
        InteractionHand hand=event.getHand();

        ItemStack itemStack=player.getItemInHand(hand);
        if(itemStack.getItem()instanceof ConstractItem)
        {
            ConstractItem.setConstract(itemStack,new ConstractInfo(List.of("Billy", "Van"), List.of("Banana"), new AbstractContent() {
                @Override
                public CompoundTag getOrCreateContentPack() {
                    return null;
                }

                @Override
                public void loadContentPack(CompoundTag contentPack) {

                }
            }));
        }

    }
}
